﻿namespace QueryData
{
    internal class 查询单个数据
    {
        void MyMethod()
        {
            var db = new BasicDbContext();

            db.BasicEntities.Find(1);

            db.BasicEntities.First();
            db.BasicEntities.Last();

            db.BasicEntities.First(x => x.Text != null);

            db.BasicEntities.Where(x => x.Text != null).LastOrDefault();

            db.BasicEntities.Single(x => x.Text == null);
        }


    }
}
